package com.probox.common.entity.service.order;

import com.baomidou.mybatisplus.extension.service.IService;
import com.probox.common.core.web.domain.AjaxResult;
import com.probox.common.entity.domain.order.OrderRecharge;
import com.probox.common.entity.vo.customer.CustomerRechargeVo;

import java.util.List;

/**
 * 充值订单Service接口
 *
 * @author hds
 * @date 2021-06-07
 */
public interface IOrderRechargeService extends IService<OrderRecharge> {

    /**
     * 查询客户的消费记录
     *
     * @param customerUid
     * @return
     */
    public List<CustomerRechargeVo> listConsumptionByUid(Long customerUid,String time);


    /**
     * 查询客户的余额消费记录
     *
     * @param customerUid
     * @return
     */
    public List<CustomerRechargeVo> listBalanceChange(Long customerUid);

    /**
     * 查询用户的消费统计
     *
     * @param customerUid
     * @return
     */
    public AjaxResult getConsumptionStatics(Long customerUid);

    /**
     * 查询充值订单
     *
     * @param rechargeUid 充值订单ID
     * @return 充值订单
     */
    public OrderRecharge selectOrderRechargeById(Long rechargeUid);


    /**
     * 查询充值订单列表
     *
     * @param orderRecharge 充值订单
     * @return 充值订单集合
     */
    public List<OrderRecharge> queryList(OrderRecharge orderRecharge);


    public OrderRecharge sumQueryList(OrderRecharge orderRecharge);

    /**
     * 新增充值订单
     *
     * @param orderRecharge 充值订单
     * @return 结果
     */
    public boolean insertOrderRecharge(OrderRecharge orderRecharge);

    /**
     * 修改充值订单
     *
     * @param orderRecharge 充值订单
     * @return 结果
     */
    public boolean updateOrderRecharge(OrderRecharge orderRecharge);

    /**
     * 储值
     * @param orderRecharge
     * @return
     */
    public boolean recharge(OrderRecharge orderRecharge);

    /**
     * 批量删除充值订单
     *
     * @param rechargeUids 需要删除的充值订单ID
     * @return 结果
     */
    public boolean deleteOrderRechargeByIds(Long[] rechargeUids);

    /**
     * 根据支付单号获取充值订单
     *
     * @param parentOrderNo
     * @return
     */
    OrderRecharge getByParentOrderNo(String parentOrderNo);

    List<OrderRecharge> listOrderRechargeByCustomerId(Long customerUid);


}
